package com.graduation.vaccine.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.vaccine.dto.ProductionListDTO;
import com.graduation.vaccine.dto.VaccineDTO;
import com.graduation.vaccine.dto.VaccineInfoDTO;
import com.graduation.vaccine.pojo.Production;
import com.graduation.vaccine.vo.AddProductionVo;
import com.graduation.vaccine.vo.UpdateProductionVo;
import com.graduation.vaccine.vo.VaccineVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhaoJunYao
 * @since 2022-04-12
 */
@Mapper
public interface ProductionMapper extends BaseMapper<Production> {

    /**
     * 获取疫苗列表
     * @return
     */
    List<Production> getAll();

    //根据ProductionId和Departmentcode获取疫苗详情
    VaccineInfoDTO getInfoByProductionIdAndDepartmentcode(VaccineVo vaccineVo);

    /**
     * 获取得到类别下的列表
     * @param catalogId
     * @return
     */
    List<VaccineDTO> getListByCatalogId(String catalogId);

    List<ProductionListDTO> getProductionList();

    List<ProductionListDTO> getOrgProductionList(String departmentCode);

    //web——添加疫苗
    int addOne(AddProductionVo addProductionVo);

    int updateOne(UpdateProductionVo updateProductionVo);
}
